<script>
export default {
    name: "MenuItem",
    props:{
        value:Object
    }
}
</script>

<template>
    <el-menu-item v-if="!value.children" :index="value.path">
        <i :class="value.icon"/>
        <span>{{ value.title }}</span>
    </el-menu-item>
    <el-sub-menu v-else :index="value.path">
        <template #title>
            <i :class="value.icon"/>
            <span>{{ value.title }}</span>
        </template>
        <MenuItem v-for="item in value.children" :value="item"/>
    </el-sub-menu>
</template>

<style scoped>

</style>
